|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectno.feide.mellon.filter.AuthenticationFilter
public class AuthenticationFilter
The less-than-elegant use of system properties to store filter configuration has been preserved to provide maximum backwards compatibility with the Mellon1 version of this filter.
Field Summary | |
---|---|
private no.feide.moria.log.MessageLogger |
log
Used for logging. |
static java.lang.String[] |
OPTIONAL_PROPERTIES
Optional configuration properties. |
static java.lang.String |
PROPERTY_FILE
The filename of the filter configuration file. |
static java.lang.String[] |
REQUIRED_PROPERTIES
Required configuration properties. |
Constructor Summary | |
---|---|
AuthenticationFilter()
|
Method Summary | |
---|---|
void |
destroy()
Does nothing. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Perform authentication. |
void |
init(javax.servlet.FilterConfig config)
Initialize configuration for this filter. |
private void |
setProperty(java.lang.String property,
javax.servlet.FilterConfig filterConfig,
java.util.Properties propertyFile)
Utility method used to set each configuration property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private no.feide.moria.log.MessageLogger log
public static final java.lang.String[] REQUIRED_PROPERTIES
"no.feide.mellon.serviceUsername"
"no.feide.mellon.servicePassword"
"no.feide.mellon.endpoint"
public static final java.lang.String[] OPTIONAL_PROPERTIES
"no.feide.mellon.requestedAttributes"
public static final java.lang.String PROPERTY_FILE
"/mellon.properties"
.
Constructor Detail |
---|
public AuthenticationFilter()
Method Detail |
---|
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
config
- The filter configuration.
javax.servlet.ServletException
- If unable to set the filter's Mellon2 configuration.private void setProperty(java.lang.String property, javax.servlet.FilterConfig filterConfig, java.util.Properties propertyFile) throws javax.servlet.ServletException
PROPERTY_FILE
.
property
- The property to set. string.filterConfig
- The filter's configuration.propertyFile
- Properties read from the file PROPERTY_FILE
.
javax.servlet.ServletException
- If unable to set property
based on these three
sources.public void destroy()
destroy
in interface javax.servlet.Filter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
HttpSession
. Servlets, or other filters,
may then use these data for user authorization.
doFilter
in interface javax.servlet.Filter
request
- The request.response
- The response.chain
- The filter chain.
java.io.IOException
javax.servlet.ServletException
- If a problem should occur using the client-side API.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |